home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / blitzbasic / blitz-list200994.lha / blitz-list / 000542_blitz-list-request_Sat Aug 20 15:26:13 1994.msg < prev    next >
Internet Message Format  |  1994-09-20  |  2KB

  1. Received: from po2.andrew.cmu.edu (PO2.ANDREW.CMU.EDU [128.2.10.102]) by kantti.helsinki.fi (8.6.9/8.6.5) with SMTP id PAA15621 for <blitz-list@helsinki.fi>; Sat, 20 Aug 1994 15:25:57 +0300
  2. Received: (from postman@localhost) by po2.andrew.cmu.edu (8.6.7/8.6.6) id IAA03002; Sat, 20 Aug 1994 08:25:54 -0400
  3. Received: via switchmail; Sat, 20 Aug 1994 08:25:53 -0400 (EDT)
  4. Received: from unix11.andrew.cmu.edu via qmail
  5.           ID </afs/andrew.cmu.edu/service/mailqs/q001/QF.8iJTMKW00YUnA12tIV>;
  6.           Sat, 20 Aug 1994 08:24:55 -0400 (EDT)
  7. Received: from unix11.andrew.cmu.edu via qmail
  8.           ID </afs/andrew.cmu.edu/usr2/wn22/.Outgoing/QF.giJTMGi00YUn9lPFJz>;
  9.           Sat, 20 Aug 1994 08:24:50 -0400 (EDT)
  10. Received: from mms.4.60.Nov..4.1993.10.47.32.pmax.ul4.EzMail.2.0.CUILIB.3.45.SNAP.NOT.LINKED.unix11.andrew.cmu.edu.pmax.ul4
  11.           via MS.5.6.unix11.andrew.cmu.edu.pmax_ul4;
  12.           Sat, 20 Aug 1994 08:24:50 -0400 (EDT)
  13. Message-ID: <AiJTMGe00YUnRlPFAU@andrew.cmu.edu>
  14. Date: Sat, 20 Aug 1994 08:24:50 -0400 (EDT)
  15. From: William Nolan <wn22+@andrew.cmu.edu>
  16. To: Martin Kift <M.H.Kift@swansea.ac.uk>
  17. Subject: Re: Vwait 250
  18. Cc: blitz-list@helsinki.fi
  19. In-Reply-To: <Pine.3.89.9408201524.B12476-0100000@iconz.co.nz>
  20. MIME-Version: 1.0
  21. Content-Type: text/plain; charset="us-ascii"
  22. Content-Transfer-Encoding: 7bit
  23. X-Status: 
  24. Status: RO
  25.  
  26. Ok I looked thru the Ref. Manual and I found this interesting little
  27. hack.  I say hack because I'm sure it's probably not a good idea to do
  28. stuff like this, but hey, taking over the system isn't very nice either
  29. :).  Anyway, use this at your own risk.  All it does is check the bit in
  30. PRB to see whether the disk motor is on or not.  It SAYS in the manual
  31. that this bit also tells you whether the drive light is on or off, so it
  32. should work.  I dunno ... all I can say is try it on a blank floppy
  33. before you use it on DH0: .. here it is:
  34.  
  35. ; (hopefully) waits until disk activity
  36. ; is done after startup and allows the program to continue (to avoid
  37. ; messing up the disk when taking over the system).
  38.  
  39. CIA_B_PRB    equ $bfd100            ; Peripheral Data Reg. Port B
  40.  
  41. WaitForDiskActivityToFinish:
  42.  
  43.     move.b CIA_B_PRB,d0
  44.     and.b #%10000000,d0            ; check the 8th bit
  45.     cmp.b #0,d0                ; if it's equal to 0, then...
  46.     beq.s WaitForDiskActivityToFinish    ; the motor is on, so loop...
  47.  
  48.  
  49.  
  50.  
  51.  
  52. William Nolan (wn22@cmu.edu)
  53.